package com.nfit.entity.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResponeVo {
    private int code;
    private String msg;
    private Object data;

    public static ResponeVo success() {
        return success(null);
    }

    public static ResponeVo success(Object data) {
        return new ResponeVo(200, "success", data);
    }

    public static ResponeVo fail() {
        return fail(null);
    }

    public static ResponeVo fail(String msg) {
        return new ResponeVo(500, msg, null);
    }
}
